#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int toNum(char ch)
{
	return ch - '0';
}
int main()
{
	int tonum[255], sum;
	char num[10001 + 5];
	for (int i = '0'; i <= '9'; i++)tonum[i] = toNum((char)i);
	while (cin >> num)
	{
		sum = 0;
		for (int i = 0; i < strlen(num); i++)sum += tonum[num[i]];
		cout << strlen(num) << " " << sum << "\r\n";

	}
	return 0;
}